package com.atlanta.adopt;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.atlanta.adopt.Globals.campus;

public class PetInfoDisplayActivity extends Activity {
	private Animal animalModel;
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		animalModel = ((Globals)this.getApplication()).paramAnimalForPetInfo;
		setContentView(R.layout.petinfo);
		ImageView image = (ImageView) findViewById(R.id.petinfopetpicture);
		TextView desc = (TextView) findViewById(R.id.petinfodescriptionbox);
		image.setImageBitmap(animalModel.getPic());
		desc.setText(animalModel.toString());		
	}
	public void info(View v){
		Class<? extends Activity> campusClass = ((Globals)this.getApplication()).type ==
				campus.HOWELL_MILL ? HowellInfoActivity.class : MansellInfoActivity.class;
		Intent intent = new Intent(this, campusClass);
		startActivityForResult(intent, 0);
	}
	public void back (View v){
		finish();
	}
}
